home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / DYN401.ZIP / class / bitary.c < prev    next >
C/C++ Source or Header  |  1997-04-16  |  2KB  |  92 lines

  1.  
  2.  
  3. /*  Copyright (c) 1993-1996 Algorithms Corporation  */
  4. /*  All rights reserved.  */
  5.  
  6.  
  7.  
  8.  
  9. /*  This file automatically generated by dpp - do not edit  */
  10.  
  11. #define    DPP_STRATEGY    2
  12. #define    DPP_FASTWIDE    0
  13.  
  14.  
  15.  
  16. #line 18 "bitary.d"
  17. #include "array1.h" 
  18.  
  19. #define    CLASS    BitArray_c
  20. #define    ivType    BitArray_iv_t
  21.  
  22. #include "generics.h"
  23.  
  24. object    BitArray_c;
  25.  
  26.  
  27.  
  28. #line 24 "bitary.d"
  29. cvmeth objrtn BitArray_cvm_vNew(object self, va_list _rest_)
  30.     unsigned rank = va_arg(_rest_, unsigned);
  31.  
  32. #line 26 "bitary.d"
  33.     static gNewArray_t cnew = NULL; 
  34.     MAKE_REST(rank); 
  35.  
  36.     if (!cnew) 
  37.         cnew = cmcPointer(Array, gNewArray); 
  38.     return cnew(self, AT_BIT, rank, _rest_); 
  39.  
  40. #line 43 "bitary.c"
  41.  
  42. static    objrtn    BitArray_cfm_vNew(object self, ...)
  43. {
  44.     va_list    _rest_;
  45.     va_start(_rest_, self);
  46.     return BitArray_cvm_vNew(self, _rest_);
  47. }
  48.  
  49.  
  50.  
  51. #line 54 "bitary.c"
  52.  
  53. objrtn    BitArray_initialize(void)
  54. {
  55.     static  CRITICALSECTION  cs;
  56.     static  int volatile once = 0;
  57.  
  58.     ENTERCRITICALSECTION(_CI_CS_);
  59.     if (!once) {
  60.         INITIALIZECRITICALSECTION(cs);
  61.         once = 1;
  62.     }
  63.     LEAVECRITICALSECTION(_CI_CS_);
  64.  
  65.     ENTERCRITICALSECTION(cs);
  66.  
  67.     if (BitArray_c) {
  68.         LEAVECRITICALSECTION(cs);
  69.         return BitArray_c;
  70.     }
  71.     INHIBIT_THREADER;
  72.     Array_initialize();
  73.     if (BitArray_c)  {
  74.         ENABLE_THREADER;
  75.         LEAVECRITICALSECTION(cs);
  76.         return BitArray_c;
  77.     }
  78.     BitArray_c = gNewClass(Class, "BitArray", 0, 0, Array, END);
  79.     cvMethodFor(BitArray, vNew, BitArray_cvm_vNew, BitArray_cfm_vNew);
  80.  
  81.     ENABLE_THREADER;
  82.  
  83.     LEAVECRITICALSECTION(cs);
  84.  
  85.     return BitArray_c;
  86. }
  87.  
  88.  
  89.  
  90.